package edu.ucsc.gameAI.conditions;

import pacman.game.Game;
import pacman.game.Constants.GHOST;
import edu.ucsc.gameAI.ICondition;

public class DoesNodeContainGhost implements ICondition{

	
	public boolean test(Game game, int nodeIndex) {
		
		for (GHOST ghost : GHOST.values()) {
			
			if(game.getGhostLairTime(ghost) > 0 || game.isGhostEdible(ghost))
				continue;
			
			int ghostIndex = game.getGhostCurrentNodeIndex(ghost);

			if (nodeIndex == ghostIndex)
				return true;
		}
		return false;
	}

	@Override
	public boolean test(Game game) {
		// TODO Auto-generated method stub
		return false;
	}

}
